import { http } from "@/utils/http";
import { baseUrlApi, type Result, type ListResult } from "@/utils/apiPublic";
import { BaseApi } from "../base";

/** 员工列表 */
export const getStaffList = (data?: object) => {
  return http.request<ListResult>("post", baseUrlApi("admin/staff/list"), {
    data
  });
};
/** 员工新增/更新 */
export const staffSave = (data?: object) => {
  return http.request<Result>("post", baseUrlApi("admin/staff/save"), {
    data
  });
};

/** 员工删除 */
export const staffDelete = (data?: object) => {
  return http.request<Result>("post", baseUrlApi("admin/staff/delete"), {
    data
  });
};

export const staffApi = new BaseApi('admin/staff');